var MockingTests = {
  /* MockElement(opts) */
  MockElementTest: {
    setup: function() {
      // more options than any element could possibly
      // need, but for a reason.  the class methods
      // in MockElement apply common constructor arguments
      // for all elements, not just the base ones that
      // MockElement itself uses.
      var opts = {
        id: 'elementID',
        innerHTML: 'html code',
        innerText: 'some text',
        value: 'some value',
        style: { foo: 'bar', foobar: 'baz' },
        options: [new Object(), new Object()],
        selectedIndex: 0,
        focused: true
      };
      var target = new MockElement(opts);
      opts.target = target;

      return opts;
    },

    teardown: function() {
    },

    testMergeBaseOptionsClassMethodSetsIdIfPassed: function(params) {
      var elem = {};
      MockElement.mergeBaseOptions(params, elem);

      Assert.areEqual(params.id, elem.id);

      elem = {};
      MockElement.mergeBaseOptions(null, elem);

      Assert.areEqual('', elem.id);
    },

    testMergeBaseOptionsClassMethodSetsInnerHTMLIfPassed: function(params) {
      var elem = {};
      MockElement.mergeBaseOptions(params, elem);

      Assert.areEqual(params.innerHTML, elem.innerHTML);

      elem = {};
      MockElement.mergeBaseOptions(null, elem);

      Assert.areEqual('', elem.innerHTML);
    },

    testMergeBaseOptionsClassMethodSetsStyleIfPassed: function(params) {
      var elem = {};
      MockElement.mergeBaseOptions(params, elem);

      for (var x in params.style) {
        Assert.areEqual(params.style[x], elem.style[x]);
      }

      elem = {};
      MockElement.mergeBaseOptions(null, elem);

      Assert.areEqual('', elem.style.display);
    },

    testHasSelectionClassMethodSetsOptionsIfPassed: function(params) {
      var elem = {};
      MockElement.hasSelection(params, elem);

      for (var i = params.options.length - 1; i >= 0; --i) {
        Assert.areSame(params.options[i], elem.options[i]);
      }

      elem = {};
      MockElement.hasSelection(null, elem);

      Assert.areEqual(0, elem.options.length);
    },

    testHasSelectionClassMethodSetsSelectedIndexIfPassed: function(params) {
      var elem = {};
      MockElement.hasSelection(params, elem);

      Assert.areEqual(params.selectedIndex, elem.selectedIndex);

      elem = {};
      MockElement.hasSelection(null, elem);

      Assert.areEqual(-1, elem.selectedIndex);
    },

    testHasFocusClassMethodSetsFocusedIfPassed: function(params) {
      var elem = {};
      MockElement.hasFocus(params, elem);

      Assert.areEqual(params.focused, elem.focused);

      elem = {};
      MockElement.hasFocus(null, elem);

      Assert.isFalse(elem.focused);
    },

    testHasFocusClassMethodAddsFocusMethodToElem: function(params) {
      var elem = {};
      MockElement.hasFocus({focused: false}, elem);

      elem.focus();

      Assert.isTrue(elem.focused);
    },

    testHasChangeEventClassMethodAddsOnChangeHandlerIfPassed: function(params) {
      var elem = {};
      var called = false;
      MockElement.hasChangeEvent({onchange: function() {
        called = true;
      }}, elem);

      elem.onchange();

      Assert.isTrue(called);

      elem = {};
      MockElement.hasChangeEvent(null, elem);

      Assert.doesNotThrow(function() { elem.onchange(); });
    },

    testHasClickEventClassMethodAddsOnClickHandlerIfPassed: function(params) {
      var elem = {};
      var called = false;
      MockElement.hasClickEvent({onclick: function() {
        called = true;
      }}, elem);

      elem.onclick();

      Assert.isTrue(called);

      elem = {};
      MockElement.hasClickEvent(null, elem);

      Assert.doesNotThrow(function() { elem.onclick(); });
    },

    testHasInnerTextClassMethodAddsInnerTextIfPassed: function(params) {
      var elem = {};
      MockElement.hasInnerText(params, elem);

      Assert.areEqual(params.innerText, elem.innerText);

      elem = {};
      MockElement.hasInnerText(null, elem);

      Assert.areEqual('', elem.innerText);
    },

    testHasValueClassMethodAddesValueIfPassed: function(params) {
      var elem = {};
      MockElement.hasValue(params, elem);

      Assert.areEqual(params.value, elem.value);

      elem = {};
      MockElement.hasValue(null, elem);

      Assert.areEqual('', elem.value);
    },

    testConstructorMergesBaseElementOptions: function(params) {
      Assert.fail('test not yet written.');
    }
  },

  /* MockSelect(obj) */
  MockSelectTest: {
    setup: function() {
      var opts = {
        id: 'selectID',
        innerHTML: 'html code',
        style: { foo: 'bar', foobar: 'baz' },
        options: [new Object(), new Object()],
        selectedIndex: 0,
        focused: false,
        onchange: function() { /* noop */ }
      };
      var target = new MockSelect(opts);
      opts.target = target;

      return opts;
    },

    testConstructorMergesBaseElementOptions: function(params) {
      Assert.fail('test not yet written.');
    },

    testConstructorCallsHasSelection: function() {
      Assert.fail('test not yet written');
    },

    testConstructorCallsHasFocus: function() {
      Assert.fail('test not yet written');
    },

    testConstructorCallsHasChangeEvent: function() {
      Assert.fail('test not yet written');
    },

    testConstructorCallsHasInnerText: function() {
      Assert.fail('test not yet written');
    }
  },

  /* MockDiv(obj) */
  MockDivTest: {
    testConstructorMergesBaseElementOptions: function(params) {
      Assert.fail('test not yet written.');
    },

    testConstructorCallsHasInnerText: function() {
      Assert.fail('test not yet written');
    }
  },

  /* MockTextInput(obj) */
  MockTextInputTest: {
    testConstructorMergesBaseElementOptions: function(params) {
      Assert.fail('test not yet written.');
    },

    testConstructorCallsHasChangeEvent: function() {
      Assert.fail('test not yet written');
    },

    testConstructorCallsHasFocus: function() {
      Assert.fail('test not yet written');
    },

    testConstructorCallsHasValue: function() {
      Assert.fail('test not yet written');
    }
  },

  /* MockButtonInput(obj) */
  MockButtonInputTest: {
    testConstructorMergesBaseElementOptions: function(params) {
      Assert.fail('test not yet written.');
    },

    testConstructorCallsHasClickEvent: function() {
      Assert.fail('test not yet written');
    },

    testConstructorCallsHasFocus: function() {
      Assert.fail('test not yet written');
    },

    testConstructorCallsHasValue: function() {
      Assert.fail('test not yet written');
    }
  },

  /* MockImage(obj) */
  MockImageTest: {
    setup: function() {
      var opts = {
        src: 'image src'
      };

      var target = new MockImage(opts);
      opts.target = target;

      return opts;
    },

    testConstructorMergesBaseElementOptions: function(params) {
      Assert.fail('test not yet written.');
    },

    testConstructorCallsHasClickEvent: function() {
      Assert.fail('test not yet written');
    },

    testConstructorSetsSrcIfPassed: function(params) {
      var target = params.target;

      Assert.areEqual(params.src, target.src);

      target = new MockImage(null);

      Assert.areEqual('', target.src);
    }
  },

  /* MockTable(obj) */
  MockTableTest: {

  },

  /* MockTableRow(obj) */
  MockTableRowTest: {

  },

  /* MockIFrame(obj) */
  MockIFrameTest: {

  },

  /* MockOption(text, value) */
  MockOptionTest: {

  },

  /* MockEvent(keyCode) */
  MockEventTest: {

  }
};
